home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11103 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.2 KB  |  38 lines

  1. Path: the-fly.zip.com.au!brister
  2. From: brister@zip.com.au (James Brister)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: HELP !!(RAISE A NUMBER TO A NEGATIVE POWER)
  5. Date: 10 Mar 1996 19:32:54 GMT
  6. Organization: Internet Software Consortium
  7. Message-ID: <4hvap6$8g1@the-fly.zip.com.au>
  8. References: <4hlqve$26t@dub-news-svc-6.compuserve.com> <Dnx1Bu.pp@research.att.com>
  9. NNTP-Posting-Host: zipper.zip.com.au
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Andrew Koenig (ark@research.att.com) wrote:
  13. : In article <4hlqve$26t@dub-news-svc-6.compuserve.com> <102627.3053@compuserve.com> writes:
  14.  
  15. : > IM TRYING TO CREATE A FUNCTION THAT WILL:
  16. : > 1.)  RAISE A NUMBER TO A POWER BOTH POSITIVE AND NEGATIVE.
  17. : > ALSO 0 TO ANY POWER WOULD REPORT 0 AND THAT ANY NUMBER TO 
  18. : > THE 0 POWER IS ONE.
  19. : > 2.)  DO THE SAME USING A RECURSIVE FUNCTION.
  20.  
  21. : Asking someone else to do your homework for you
  22. : is usually considered plagiarism; when I was in
  23. : school, it was cause for expulsion.
  24.  
  25. You're so untrusting....
  26.  
  27.     (defun power (x y)
  28.         (expt x y))
  29.  
  30. Wait a minute... where am I? Opps. Sorry, wrong newsgroup....
  31.  
  32. (I suppose I should include a... :-)
  33.  
  34. James
  35. --
  36. James Brister                                              brister@vix.com
  37. The Internet Software Consortium
  38.